import { createStore } from 'vuex'

export default createStore({
  state: {
    categoryList: ['孙燕姿','周杰伦','蔡依林','SHE','梁静茹']
  },
  actions: {
    addCategory(context, item){
      context.commit('addCategory', item);
    }
  },
  mutations: {
    addCategory(state, item){
      state.categoryList.push(item)
    }
  },
  modules: {
  }
})

